package com.litt.saap.message.po;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import java.io.Serializable;

/**
 * <br>
 * Table:user_event<br>
 * @author Hibernate Tools 3.4.0.CR1
 * @version 1.0
 * @since May 11, 2015 3:44:21 PM
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(name = "user_event")
public class UserEvent implements Serializable {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 序号.
	 */
	private Long id;

	/**
	 * 所属租户.
	 */
	private int tenantId;

	/**
	 * 所属用户.
	 */
	private int userId;

	/**
	 * 模块编号.
	 */
	private String moduleCode;

	/**
	 * 参数（JSON结构）.
	 */
	private String params;

	/**
	 * 内容.
	 */
	private String content;

	/**
	 * 创建时间.
	 */
	private Date createDatetime;

	public UserEvent() {
	}

	public UserEvent(int tenantId, int userId, String moduleCode,
			String params, String content, Date createDatetime) {
		this.tenantId = tenantId;
		this.userId = userId;
		this.moduleCode = moduleCode;
		this.params = params;
		this.content = content;
		this.createDatetime = createDatetime;
	}

	/**  
	 * Get 序号.
	 * @return 序号
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	/**
	 * Set 序号.
	 * @param id 序号
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**  
	 * Get 所属租户.
	 * @return 所属租户
	 */

	@Column(name = "TENANT_ID", nullable = false)
	public int getTenantId() {
		return this.tenantId;
	}

	/**
	 * Set 所属租户.
	 * @param tenantId 所属租户
	 */
	public void setTenantId(int tenantId) {
		this.tenantId = tenantId;
	}

	/**  
	 * Get 所属用户.
	 * @return 所属用户
	 */

	@Column(name = "USER_ID", nullable = false)
	public int getUserId() {
		return this.userId;
	}

	/**
	 * Set 所属用户.
	 * @param userId 所属用户
	 */
	public void setUserId(int userId) {
		this.userId = userId;
	}

	/**  
	 * Get 模块编号.
	 * @return 模块编号
	 */

	@Column(name = "MODULE_CODE", nullable = false, length = 20)
	public String getModuleCode() {
		return this.moduleCode;
	}

	/**
	 * Set 模块编号.
	 * @param moduleCode 模块编号
	 */
	public void setModuleCode(String moduleCode) {
		this.moduleCode = moduleCode;
	}

	/**  
	 * Get 参数（JSON结构）.
	 * @return 参数（JSON结构）
	 */

	@Column(name = "PARAMS", nullable = false, length = 4000)
	public String getParams() {
		return this.params;
	}

	/**
	 * Set 参数（JSON结构）.
	 * @param params 参数（JSON结构）
	 */
	public void setParams(String params) {
		this.params = params;
	}

	/**  
	 * Get 内容.
	 * @return 内容
	 */

	@Column(name = "CONTENT", nullable = false, length = 65535)
	public String getContent() {
		return this.content;
	}

	/**
	 * Set 内容.
	 * @param content 内容
	 */
	public void setContent(String content) {
		this.content = content;
	}

	/**  
	 * Get 创建时间.
	 * @return 创建时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATETIME", nullable = false, length = 19)
	public Date getCreateDatetime() {
		return this.createDatetime;
	}

	/**
	 * Set 创建时间.
	 * @param createDatetime 创建时间
	 */
	public void setCreateDatetime(Date createDatetime) {
		this.createDatetime = createDatetime;
	}

}
